﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YwhLib
{
    /// <summary>
    /// 房间
    /// </summary>
    [FreeSql.DataAnnotations.Index("room_phaseno_buildingno_unitno_roomno", "PhaseNo,BuildingNo,UnitNo,RoomNo", true)]
    public class Room
    {
        /// <summary>
        /// 房子编号，自增
        /// </summary>
        [FreeSql.DataAnnotations.Column(IsIdentity = true, IsPrimary = true)]
        public int RoomId { get; set; }

        /// <summary>
        /// 房屋编号字符
        /// </summary>
        [FreeSql.DataAnnotations.Column(IsIgnore = true)]
        public string RoomIdS { get { return RoomId.ToString(); } }

        /// <summary>
        /// 期号
        /// </summary>
        public int PhaseNo { get; set; }

        /// <summary>
        /// 期号字符
        /// </summary>
        [FreeSql.DataAnnotations.Column(IsIgnore = true)]
        public string PhaseNoS { get { return PhaseNo.ToString(); } }

        /// <summary>
        /// 楼号
        /// </summary>
        public int BuildingNo { get; set; }

        /// <summary>
        /// 楼号字符
        /// </summary>
        [FreeSql.DataAnnotations.Column(IsIgnore = true)]
        public string BuildingNoS { get { return BuildingNo.ToString(); } }

        /// <summary>
        /// 单元号
        /// </summary>
        public int UnitNo { get; set; }

        /// <summary>
        /// 单元号字符
        /// </summary>
        [FreeSql.DataAnnotations.Column(IsIgnore = true)]
        public string UnitNoS { get { return UnitNo.ToString(); } }

        /// <summary>
        /// 房号
        /// </summary>
        public int RoomNo { get; set; }

        /// <summary>
        /// 房号字符
        /// </summary>
        [FreeSql.DataAnnotations.Column(IsIgnore = true)]
        public string RoomNoS { get { return RoomNo.ToString(); } }

        /// <summary>
        /// 产权面积
        /// </summary>
        public double Area { get; set; }
    }
}